#ifndef _KEYBOARDHANDLER_H
#define _KEYBOARDHANDLER_H
#include <map>
#include <allegro.h>

class KeyboardHandler {
    public:
        /*
         * Registers a key (char) by providing a funtionpointer
         * to the function that is to be called when the
         * the key is pressed/handled.
         */
        void registerKey(char, void(*funcPtr)(void));

        /*
         * Executes the associated function with the key (provided as
         * param). 
         */
        int handle(int);

    private:
        /*
         * mCallbacks maps a certain key, e.g. KEY_SPACE
         * to a specific routine-pointer.
         */
        //std::map<char,void(*)(void)>  *mCallbacks;
        void(*mCallbacks[256])(void);
};

#endif
